
'use strict';

module.exports = app => {
  class HomeController extends app.Controller {
    /**
     * controller例子，
     * 服务端渲染
     */
    async index(ctx) {
      await ctx.render('home/home.js', { "hello": ctx.__("hello") });
    }

    /**
     * 客户端渲染
     */
    async client(ctx) {
      await ctx.renderClient('home/home.js', { "hello": ctx.__("hello") });
    }
  }
  return HomeController;
}
